CC = gcc
SRCS = $(wildcard *.c)
INCS = -I. 
OBJS = $(SRCS:%.c=%.o)
CFLAGS = -Wall -O2 -Wno-pointer-sign $(INCS)

CFLAGS += $(shell mysql_config --cflags)
LDFLAGS += $(shell mysql_config --libs)

demo:$(OBJS)
	$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS)

clean:
	rm -f $(OBJS) demo
